//
//  HZHistoryKeywordCell.m
//  app
//
//  Created by 刘华舟 on 15/5/20.
//  Copyright (c) 2015年 hdaren. All rights reserved.
//

#import "HZHistoryKeywordCell.h"
#import "HZTableView.h"

static const NSInteger kHistoryKeywordCellMargin = 25;

@implementation HZHistoryKeywordCell

-(void)drawRect:(CGRect)rect
{
    [self drawSeperatorLineLeft:[self.ubo uw:25] right:[self.ubo uw:0]];
}

+ (instancetype)cellWithTableView:(HZTableView *)tableView{
    NSString *cellReuseIdentifier = @"HZHistoryKeywordCell";
       HZHistoryKeywordCell * cell= (HZHistoryKeywordCell *)[tableView dequeueReusableCellWithIdentifier:cellReuseIdentifier];
    if (cell == nil) {
        cell = [[HZHistoryKeywordCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellReuseIdentifier];
    }
    return cell;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.frame = CGRectOf([self.ufo fx:UB_LEFT fy:UB_TOP], [UBO_SCREEN fw:UB_WIDTH uh:kHistoryKeywordCellHeight]);
        
        self.backgroundColor = HZ_CLEAR_COLOR;
        //初始化商品标题

        self.keywordLabel = [[UILabel alloc] initWithFrame:CGRectOf([self.ubo fx:UB_LEFT ux:kHistoryKeywordCellMargin fy:UB_TOP],
                                                                    [self.ubo fw:UB_WIDTH uw:-2*kHistoryKeywordCellMargin fh:UB_HEIGHT])];
        self.keywordLabel.backgroundColor = HZ_CLEAR_COLOR;
        [self.keywordLabel setTextColor:HZ_MALL_TEXT_GRAY_COLOR];
        self.keywordLabel.textAlignment = NSTextAlignmentLeft;
        [self.keywordLabel setFont:JKAppGlobleFontContentText];
        [self addSubview:self.keywordLabel];
        
    }
    
    return self;
}

@end
